import request from '@/utils/request'
export const sysLogin = (data) => {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}
// 获取用户基本资料
export const sysProfile = (data) => {
  return request({
    url: '/sys/profile',
    method: 'post',
    noToken: false, // 需要token
    // headers: {
    //   Authorization: `Bearer ${store.state.user.token}`
    // },
    data
  })
}
// 获取员工头像即其他信息
export const sysUser = (id) => {
  return request({
    url: `/sys/user/${id}`
  })
}
// 修改用户信息
export const sysUserEdit = (data) => {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put',
    data
  })
}
